home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / ColorSync 3.0 Mac SDK / Interfaces / CMMComponent.p < prev    next >
Encoding:
Text File  |  1999-10-28  |  10.8 KB  |  230 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMMComponent.p
  3.  
  4.      Contains:    ColorSync CMM Component API
  5.  
  6.      Version:    Technology:    ColorSync 2.6
  7.                  Release:    ColorSync 3.0 SDK for use with Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT CMMComponent;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __CMMCOMPONENT__}
  27. {$SETC __CMMCOMPONENT__ := 1}
  28.  
  29. {$I+}
  30. {$SETC CMMComponentIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __QUICKDRAW__}
  34. {$I Quickdraw.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __COMPONENTS__}
  37. {$I Components.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __CMAPPLICATION__}
  40. {$I CMApplication.p}
  41. {$ENDC}
  42.  
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48.  
  49. CONST
  50.     CMMInterfaceVersion            = 1;
  51.  
  52.  
  53. { Component function selectors }
  54.                                                                 {  Required  }
  55.     kNCMMInit                    = 6;
  56.     kCMMMatchColors                = 1;
  57.     kCMMCheckColors                = 2;                            {  }
  58.                                                                 {  }
  59.                                                                 {  Optional  }
  60.     kCMMValidateProfile            = 8;
  61.     kCMMMatchBitmap                = 9;
  62.     kCMMCheckBitmap                = 10;
  63.     kCMMMatchPixMap                = 3;
  64.     kCMMCheckPixMap                = 4;
  65.     kCMMConcatenateProfiles        = 5;
  66.     kCMMConcatInit                = 7;
  67.     kCMMNewLinkProfile            = 16;
  68.     kNCMMConcatInit                = 18;
  69.     kNCMMNewLinkProfile            = 19;
  70.     kCMMGetPS2ColorSpace        = 11;
  71.     kCMMGetPS2ColorRenderingIntent = 12;
  72.     kCMMGetPS2ColorRendering    = 13;
  73.     kCMMGetPS2ColorRenderingVMSize = 17;                        {  }
  74.                                                                 {  }
  75.                                                                 {  obsolete with ColorSync 2.5  }
  76.     kCMMFlattenProfile            = 14;
  77.     kCMMUnflattenProfile        = 15;                            {  }
  78.                                                                 {  }
  79.                                                                 {  obsolete with ColorSync 2.6  }
  80.     kCMMInit                    = 0;
  81.     kCMMGetNamedColorInfo        = 70;
  82.     kCMMGetNamedColorValue        = 71;
  83.     kCMMGetIndNamedColorValue    = 72;
  84.     kCMMGetNamedColorIndex        = 73;
  85.     kCMMGetNamedColorName        = 74;
  86.  
  87.     kCMMOpen                    = -1;
  88.     kCMMClose                    = -2;
  89.     kCMMGetInfo                    = -4;
  90.  
  91. {$IFC TARGET_API_MAC_OS8 }
  92.  
  93. TYPE
  94.     CMMComponentInst                    = ComponentInstance;
  95. FUNCTION NCMMInit(cmm: CMMComponentInst; srcProfile: CMProfileRef; dstProfile: CMProfileRef): CMError;
  96.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  97.     INLINE $2F3C, $0008, $0006, $7000, $A82A;
  98.     {$ENDC}
  99. FUNCTION CMMInit(cmm: CMMComponentInst; srcProfile: CMProfileHandle; dstProfile: CMProfileHandle): CMError;
  100.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  101.     INLINE $2F3C, $0008, $0000, $7000, $A82A;
  102.     {$ENDC}
  103. FUNCTION CMMMatchColors(cmm: CMMComponentInst; VAR colors: CMColor; count: UInt32): CMError;
  104.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  105.     INLINE $2F3C, $0008, $0001, $7000, $A82A;
  106.     {$ENDC}
  107. FUNCTION CMMCheckColors(cmm: CMMComponentInst; VAR colors: CMColor; count: UInt32; VAR result: UInt32): CMError;
  108.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  109.     INLINE $2F3C, $000C, $0002, $7000, $A82A;
  110.     {$ENDC}
  111. FUNCTION CMMValidateProfile(cmm: CMMComponentInst; prof: CMProfileRef; VAR valid: BOOLEAN): CMError;
  112.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  113.     INLINE $2F3C, $0008, $0008, $7000, $A82A;
  114.     {$ENDC}
  115. FUNCTION CMMFlattenProfile(cmm: CMMComponentInst; prof: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr): CMError;
  116.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  117.     INLINE $2F3C, $0010, $000E, $7000, $A82A;
  118.     {$ENDC}
  119. FUNCTION CMMUnflattenProfile(cmm: CMMComponentInst; VAR resultFileSpec: FSSpec; proc: CMFlattenUPP; refCon: UNIV Ptr): CMError;
  120.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  121.     INLINE $2F3C, $000C, $000F, $7000, $A82A;
  122.     {$ENDC}
  123. FUNCTION CMMMatchBitmap(cmm: CMMComponentInst; VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR matchedBitmap: CMBitmap): CMError;
  124.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  125.     INLINE $2F3C, $0010, $0009, $7000, $A82A;
  126.     {$ENDC}
  127. FUNCTION CMMCheckBitmap(cmm: CMMComponentInst; {CONST}VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR resultBitmap: CMBitmap): CMError;
  128.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  129.     INLINE $2F3C, $0010, $000A, $7000, $A82A;
  130.     {$ENDC}
  131. FUNCTION CMMMatchPixMap(cmm: CMMComponentInst; VAR pixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr): CMError;
  132.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  133.     INLINE $2F3C, $000C, $0003, $7000, $A82A;
  134.     {$ENDC}
  135. FUNCTION CMMCheckPixMap(cmm: CMMComponentInst; {CONST}VAR pixMap: PixMap; progressProc: CMBitmapCallBackUPP; VAR bitMap: BitMap; refCon: UNIV Ptr): CMError;
  136.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  137.     INLINE $2F3C, $0010, $0004, $7000, $A82A;
  138.     {$ENDC}
  139. FUNCTION CMMConcatInit(cmm: CMMComponentInst; VAR profileSet: CMConcatProfileSet): CMError;
  140.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  141.     INLINE $2F3C, $0004, $0007, $7000, $A82A;
  142.     {$ENDC}
  143. FUNCTION NCMMConcatInit(cmm: CMMComponentInst; VAR profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UNIV Ptr): CMError;
  144.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  145.     INLINE $2F3C, $000C, $0012, $7000, $A82A;
  146.     {$ENDC}
  147. FUNCTION CMMNewLinkProfile(cmm: CMMComponentInst; VAR prof: CMProfileRef; {CONST}VAR targetLocation: CMProfileLocation; VAR profileSet: CMConcatProfileSet): CMError;
  148.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  149.     INLINE $2F3C, $000C, $0010, $7000, $A82A;
  150.     {$ENDC}
  151. FUNCTION NCMMNewLinkProfile(cmm: CMMComponentInst; prof: CMProfileRef; VAR profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UNIV Ptr): CMError;
  152.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  153.     INLINE $2F3C, $0010, $0013, $7000, $A82A;
  154.     {$ENDC}
  155. FUNCTION CMMGetPS2ColorSpace(cmm: CMMComponentInst; srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr): CMError;
  156.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  157.     INLINE $2F3C, $0010, $000B, $7000, $A82A;
  158.     {$ENDC}
  159. FUNCTION CMMGetPS2ColorRenderingIntent(cmm: CMMComponentInst; srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr): CMError;
  160.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  161.     INLINE $2F3C, $0010, $000C, $7000, $A82A;
  162.     {$ENDC}
  163. FUNCTION CMMGetPS2ColorRendering(cmm: CMMComponentInst; srcProf: CMProfileRef; dstProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr): CMError;
  164.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  165.     INLINE $2F3C, $0014, $000D, $7000, $A82A;
  166.     {$ENDC}
  167. FUNCTION CMMGetPS2ColorRenderingVMSize(cmm: CMMComponentInst; srcProf: CMProfileRef; dstProf: CMProfileRef; VAR vmSize: UInt32): CMError;
  168.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  169.     INLINE $2F3C, $000C, $0011, $7000, $A82A;
  170.     {$ENDC}
  171. FUNCTION CMMConcatenateProfiles(cmm: CMMComponentInst; thru: CMProfileHandle; dst: CMProfileHandle; VAR newDst: CMProfileHandle): CMError;
  172.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  173.     INLINE $2F3C, $000C, $0005, $7000, $A82A;
  174.     {$ENDC}
  175. FUNCTION CMMGetNamedColorInfo(cmm: CMMComponentInst; srcProf: CMProfileRef; VAR deviceChannels: UInt32; VAR deviceColorSpace: OSType; VAR PCSColorSpace: OSType; VAR count: UInt32; prefix: StringPtr; suffix: StringPtr): CMError;
  176.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  177.     INLINE $2F3C, $001C, $0046, $7000, $A82A;
  178.     {$ENDC}
  179. FUNCTION CMMGetNamedColorValue(cmm: CMMComponentInst; prof: CMProfileRef; name: StringPtr; VAR deviceColor: CMColor; VAR PCSColor: CMColor): CMError;
  180.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  181.     INLINE $2F3C, $0010, $0047, $7000, $A82A;
  182.     {$ENDC}
  183. FUNCTION CMMGetIndNamedColorValue(cmm: CMMComponentInst; prof: CMProfileRef; index: UInt32; VAR deviceColor: CMColor; VAR PCSColor: CMColor): CMError;
  184.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  185.     INLINE $2F3C, $0010, $0048, $7000, $A82A;
  186.     {$ENDC}
  187. FUNCTION CMMGetNamedColorIndex(cmm: CMMComponentInst; prof: CMProfileRef; name: StringPtr; VAR index: UInt32): CMError;
  188.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  189.     INLINE $2F3C, $000C, $0049, $7000, $A82A;
  190.     {$ENDC}
  191. FUNCTION CMMGetNamedColorName(cmm: CMMComponentInst; prof: CMProfileRef; index: UInt32; name: StringPtr): CMError;
  192.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  193.     INLINE $2F3C, $000C, $004A, $7000, $A82A;
  194.     {$ENDC}
  195. {$IFC OLDROUTINENAMES }
  196. {$ENDC}
  197. {$ELSEC}
  198. FUNCTION CMMOpen(VAR cmmStorage: UInt32; hInstance: UNIV Ptr): CMError;
  199. FUNCTION CMMClose(VAR cmmStorage: UInt32): CMError;
  200. FUNCTION CMMGetCMMInfo(VAR cmmStorage: UInt32; VAR info: CMMInfo): CMError;
  201. FUNCTION NCMMInit(VAR cmmStorage: UInt32; srcProfile: CMProfileRef; dstProfile: CMProfileRef): CMError;
  202. FUNCTION CMMMatchColors(VAR cmmStorage: UInt32; VAR colors: CMColor; count: UInt32): CMError;
  203. FUNCTION CMMCheckColors(VAR cmmStorage: UInt32; VAR colors: CMColor; count: UInt32; VAR result: UInt32): CMError;
  204. FUNCTION CMMValidateProfile(VAR cmmStorage: UInt32; prof: CMProfileRef; VAR valid: BOOLEAN): CMError;
  205. FUNCTION CMMMatchBitmap(VAR cmmStorage: UInt32; VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR matchedBitmap: CMBitmap): CMError;
  206. FUNCTION CMMCheckBitmap(VAR cmmStorage: UInt32; {CONST}VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR resultBitmap: CMBitmap): CMError;
  207. FUNCTION CMMMatchPixMap(VAR cmmStorage: UInt32; VAR pixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr): CMError;
  208. FUNCTION CMMCheckPixMap(VAR cmmStorage: UInt32; {CONST}VAR pixMap: PixMap; progressProc: CMBitmapCallBackUPP; VAR bitMap: BitMap; refCon: UNIV Ptr): CMError;
  209. FUNCTION CMMConcatInit(VAR cmmStorage: UInt32; VAR profileSet: CMConcatProfileSet): CMError;
  210. FUNCTION NCMMConcatInit(VAR cmmStorage: UInt32; VAR profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UNIV Ptr): CMError;
  211. FUNCTION CMMNewLinkProfile(VAR cmmStorage: UInt32; VAR prof: CMProfileRef; {CONST}VAR targetLocation: CMProfileLocation; VAR profileSet: CMConcatProfileSet): CMError;
  212. FUNCTION NCMMNewLinkProfile(VAR cmmStorage: UInt32; prof: CMProfileRef; VAR profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UNIV Ptr): CMError;
  213. FUNCTION CMMGetPS2ColorSpace(VAR cmmStorage: UInt32; srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr): CMError;
  214. FUNCTION CMMGetPS2ColorRenderingIntent(VAR cmmStorage: UInt32; srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr): CMError;
  215. FUNCTION CMMGetPS2ColorRendering(VAR cmmStorage: UInt32; srcProf: CMProfileRef; dstProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr): CMError;
  216. FUNCTION CMMGetPS2ColorRenderingVMSize(VAR cmmStorage: UInt32; srcProf: CMProfileRef; dstProf: CMProfileRef; VAR vmSize: UInt32): CMError;
  217.  
  218. {$ENDC}  {TARGET_API_MAC_OS8}
  219.  
  220. {$ALIGN RESET}
  221. {$POP}
  222.  
  223. {$SETC UsingIncludes := CMMComponentIncludes}
  224.  
  225. {$ENDC} {__CMMCOMPONENT__}
  226.  
  227. {$IFC NOT UsingIncludes}
  228.  END.
  229. {$ENDC}
  230.